﻿using System.Web.Http;
using System.Web.Mvc;
using System.Web.Routing;

namespace SimpleScrum.App_Start
{
    public class RouteConfig
    {
        public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapHttpRoute(
                name: "Default Api",
                routeTemplate: "api/{controller}/{id}",
                defaults: new {id = RouteParameter.Optional}
                );

            routes.MapRoute(
                name: "Default",
                url: "{controller}/{action}/{id}",
                defaults: new {controller = "Home", action = "Index", id = UrlParameter.Optional}
                );
            routes.MapRoute(
                name: "Account",
                url: "Account/Manage"
                );
            routes.MapRoute(
                name: "Admin",
                url: "Areas/Admin/{controller}/{action}/{id}",
                defaults: new {controller = "ControlPanel", action = "Index", id = UrlParameter.Optional}
                );
            routes.MapRoute(
                name: "Scrum",
                url: "Areas/Scrum/{controller}/{action}/{id}",
                defaults: new {controller = "DashBoard", action = "Index", id = UrlParameter.Optional}
                );           
        }
    }
}